<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml" >
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    {{num}}
   <button @click="num++">点击</button><br/>
    <hr>
    v-text:<span v-text="hello"></span> <br/>
    v-html:<span v-html="hello"></span>
    <hr>
<!--    多个复选框，绑定到同一个数组-->
    <input type="checkbox" id="jack" value="Jack" v-model="checkedNames">
    <label for="jack">Jack</label>
    <input type="checkbox" id="john" value="John" v-model="checkedNames">
    <label for="john">John</label>
    <input type="checkbox" id="mike" value="Mike" v-model="checkedNames">
    <label for="mike">Mike</label>
    <br>
    <span>Checked names: {{ checkedNames }}</span>
<!--    单选按钮-->
    <hr>
    <input type="radio" id="one" value="One" v-model="picked">
    <label for="one">One</label>
    <br>
    <input type="radio" id="two" value="Two" v-model="picked">
    <label for="two">Two</label>
    <br>
    <span>Picked: {{ picked }}</span><br/>

    </div>
</body>
<script src="node_modules/vue/dist/vue.js" ></script>
<script>
    var vm = new Vue({
        el:"#app", // el即element，该vue实例要渲染的页面元素
        data: { // 渲染页面需要的数据
           num:0,
            hello:'<h1>指令</h1>',
            checkedNames: ['jack'],
            picked: 'one'
        }
    })
</script>
</html>